USE Liberty
GO

-- ------------------------------------------------------------------------------------------------
-- Facilities Table Create Script
-- ------------------------------------------------------------------------------------------------
SET NOCOUNT OFF
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
SET ARITHABORT ON
SET CONCAT_NULL_YIELDS_NULL ON
SET QUOTED_IDENTIFIER ON
SET NUMERIC_ROUNDABORT OFF
GO

PRINT 'Creating Table dbo.Facilities...'
GO

IF OBJECT_ID('dbo.Facilities', 'U') IS NULL
BEGIN
	CREATE TABLE dbo.Facilities
	(OID						bigint		IDENTITY(1, 1)	NOT NULL
	,Version					rowversion

	,UpdatedDate				datetime					NOT NULL
		CONSTRAINT DFLT_Facilities_UpdatedDate DEFAULT GETDATE()
	,CreatedDate				datetime					NOT NULL
		CONSTRAINT DFLT_Facilities_CreatedDate DEFAULT GETDATE()

	,CONSTRAINT PK_Facilities PRIMARY KEY CLUSTERED( OID ) --ON PRIMARY

	)

	PRINT 'Table dbo.Facilities has been created successfully.'

END
ELSE 
BEGIN
    PRINT 'Table dbo.Facilities already exists.'
END

GO
